Skip to content

First lesson on MULTIBINIT

Build a harmonic lattice model and run a dynamics

This lesson aims at showing how to build a harmonic model by using a second-principles approach for lattice dynamics simulations based on atomic potentials fitted on first-principles calculations.

Before beginning, it is very important to read the reference [Wojdel2013].

With this lesson, you will learn to:

  • Compute the model from the DDB
  • Generate the XML for the model
  • Run a dynamics within MULTIBINIT

In this tutorial, all the knowledge about the Density Functional Theory (DFT) and Density Functional Perturbation Theory (DFPT) should have been already acquired. In addition, the DFPT is a key feature of ABINIT for MULTIBINIT thus, in order to learn how to use the DFPT (producing the related DDB) and the associated code to merge different DDB files, please have a look at the tutorials on Phonon response, strain response and Mrgddb before to continue. After theses tutorials you should be able to compute a full DFPT calculation and a complete DDB file. Thereby this tutorial will not provide the inputs for ABINIT, that you can find, however, in the previously cited tutorials.

The AGATE software, used to make the analysis of the results, is also required for this tutorial. You can install it on debian with:

sudo add-apt-repository ppa:piti-diablotin/abiout
sudo apt-get update && sudo apt-get install abiout


All the necessary input files to run the examples can be found in the ~abinit/tests/ directory where ~abinit is the absolute path of the abinit top-level directory.

To execute the tutorials, you are supposed to create a working directory (Work*) and copy there the input files and the files file of the lesson.

The files file ending with _x (e.g. tbase1_x.files) must be edited every time you start to use a new input file. You will discover more about the files file in section 1.1 of the help file.

To make things easier, we suggest to define some handy environment variables by executing the following lines in the terminal:

export ABI_HOME=Replace_with_the_absolute_path_to_the_abinit_top_level_dir

export ABI_TESTS=$ABI_HOME/tests/

export ABI_TUTORIAL=$ABI_TESTS/tutorial/           # Files for base1-2-3-4, GW ...
export ABI_TUTORESPFN=$ABI_TESTS/tutorespfn/       # Files specific to DFPT tutorials.
export ABI_TUTOPARAL=$ABI_TESTS/tutoparal/         # Tutorials about parallel version
export ABI_TUTOPLUGS=$ABI_TESTS/tutoplugs/         # Examples using external libraries.
export ABI_PSPDIR=$ABI_TESTS/Psps_for_tests/       # Pseudos used in examples.

export PATH=$ABI_HOME/src/98_main/:$PATH

The examples in this tutorial will use these shell variables so that one can easily copy and paste the code snippets into the terminal (remember to set ABI_HOME first!)

The last line adds the directory containing the executables to your PATH so that one can invoke the code by simply typing abinit in the terminal instead of providing the absolute path.

Finally, to run the examples in parallel with e.g. 2 MPI processes, use mpirun (mpiexec) and the syntax:

mpirun -n 2 abinit < files_file > log 2> err

The standard output of the application is redirected to log while err collects the standard error (runtime error messages, if any, are written here).

1 The Harmonic part of the lattice model

As described in [Wojdel2013], the construction of a model starts by defining the reference structure (RS) of the system under study:

Schema 1

Fig. 1: Example of cubic RS made by two different (black and red) atomic species.

The choice of this RS is fundamental since the model will be based on perturbations acting on it. Once this choice is done, make sure than your system is fully relaxed and compute a single DFT calculation on this system in order to generate a DDB file. In this tutorial, we will take as an example of a material without instabilities, the perovskite CaTiO3 in the Pnma phase.

From the RS, now we consider the perturbations: the set of atomic displacements \boldsymbol{u} and lattice strain \boldsymbol{\eta}:

Schema 2

Fig. 2: Example of lattice perturbations: atomic displacements and strain.

At the harmonic level, we can express the potential energy as a sum of three contributions as a function of the set of perturbations (\boldsymbol{u}, \boldsymbol{\eta}):

\displaystyle E^{harm}(\boldsymbol{u},\boldsymbol{\eta}) = E^{harm}(\boldsymbol{u}) + E^{harm}(\boldsymbol{u},\boldsymbol{\eta}) + E^{harm}(\boldsymbol{\eta})

This calculation requires:

  • the computation of the phonon response (including short range and dipole-dipole interactions):
\displaystyle E^{harm}(\boldsymbol{u}) \Longrightarrow \underbrace{\frac{\partial^2 E}{\partial \boldsymbol{u}^2}}_{\substack{\text{Inter-atomic}\\\text{force constants}}} , \underbrace{\frac{\partial^2 E}{\partial {\boldsymbol{\cal{E}}}^2}}_{\text{Dielectric tensor}} , \underbrace{\frac{\partial^2 E}{\partial{\boldsymbol{\cal{E}}} \partial \boldsymbol{u}}}_{\text{Effective charges}}
  • the computation of the strain response: $$\displaystyle E^{harm}(\boldsymbol{\eta}) \Longrightarrow \underbrace{\frac{\partial^2 E}{\partial \boldsymbol{\eta}^2}}_{\text{Elastic constants}} $$

  • the computation of the strain-phonon coupling: $$\displaystyle E^{harm}(\boldsymbol{u},\boldsymbol{\eta}) \Longrightarrow \underbrace{\frac{\partial^2 E}{\partial\boldsymbol{\eta}\partial\boldsymbol{u}}}_{\substack{\text{Internal strain}}} $$

We note that all the needed quantities related to the harmonic part can be computed by using the DFPT method and, once obtained, they are stored in a database (DDB) file. In the case of an insulator, the dipole-dipole interaction will be recomputed directly by MULTIBINIT. Thereby you need to provide into the DDB file the clamped-ion dielectric tensor and the Born effective charges.


Do not forget to include in the final DDB file the DDB obtained from the RS single DFT calculation (you can still use Mrgddb). Indeed, the DDB file is also an output of a DFT calculation and, in order to build of a model, it is important to include it in the DDB file to be used.

In this tutorial, we will take as an example of a material without lattice instabilities: the perovskite CaTiO_3 in its Pnma phase.

Optional exercice \Longrightarrow Compute the phonon band structure with Anaddb. You can download the complete DDB file (resulting from the previous calculations) here: